export const TOKEN = 'micro-canteen-app'; // token
export const USER_INFO = 'user-info'; // 用户信息

export const getStorage = key => {
  const params = uni.getStorageSync(key);
  return params ? JSON.parse(params).data : false;
};

export const setStorage = (key, data) => {
  const params = {
    key: key,
    data: data
  };
  return uni.setStorageSync(key, JSON.stringify(params));
};

export const delStorage = key => {
  uni.removeStorageSync(key);
};
